package br.com.j7.jdesk.library.util;

public class ValidationUtils {

	public static final String ONLY_CARACTERS_AND_NUMBERS = "^[0-9a-zA-Z]+$";
	
	public static final String ONLY_NUMBERS = "^[0-9\\ ]+$";
	
	public static final String ONLY_LETTERS = "^[a-zA-Z\\ \\']+$";
		
	
	public static Boolean hasSpecialCharacter(String value){
		return !value.matches(ONLY_CARACTERS_AND_NUMBERS);
	}
	
	public static Boolean hasOnlyNumbers(String value){
		return value.matches(ONLY_NUMBERS);
	}
	
	public static Boolean hasOnlyLetters(String value){
		return value.matches(ONLY_LETTERS);
	}
}
